<?php

namespace app\business\controller;

use think\Controller;
use Util\SysDb;

class Article extends Controller
{
    public function articlelist()
    {
        $type = trim(input('param.type'));
        $this->db = new SysDb();
        $admin = $this->db->table('sys_article')->where(['type' => $type])->lists();
        if (!$admin) {
            exit(json_encode(['code' => 1, 'message' => 'error', "result" => "无公告"]));
        } else {
            exit(json_encode(['message' => 'succ', 'result' => $admin]));
        }
    }
}
